package demo2;

/**
 * @author Huangjin
 * @version 1.0
 * describe:
 * @date 2023/2/20 19:53
 */
public class PrimeNumber {
    public static void main(String[] args) {
        int num =100;
        for (int i = 2; i <= num; i++) {
            boolean flag = true;
            for (int j = 2; j <=i/2; j++) {
                if (i%2==0){
                    flag = false;
                    break;
                }
            }

            if (flag){
                System.out.println(i+"是素数");
            }
        }
    }
}
